package com.icangya.domain;

import org.hibernate.annotations.Type;

import javax.persistence.*;
import java.sql.Timestamp;

@Entity
@Table(name = "user_withdraw_record")
public class UserWithdrawRecord {//用户申请提现记录

    /*
    * 编号
    * */
    private Long id;
    /*
    * 用户微信id
    * */
    private String openId;

    private  String nickName;//用户名

    private  String headImgUrl;//用户头像

    private  long uid;//用户id

    private double money;//提现金额

    private  String cardName;//持卡人姓名

    private  String cardNum;//银行卡号

    private String bankName;//银行名

    private int status;//提现状态  0：成功  1：待审核  2：拒绝提现

    private Timestamp createTime;//申请提现时间



    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    @Basic
    @Column(name = "openid")
    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }
    @Basic
    @Column(name = "nick_name")
    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }
    @Basic
    @Column(name = "head_imgUrl")
    public String getHeadImgUrl() {
        return headImgUrl;
    }

    public void setHeadImgUrl(String headImgUrl) {
        this.headImgUrl = headImgUrl;
    }

    @Basic
    @Column(name = "uid")
    public long getUid() {
        return uid;
    }

    public void setUid(long uid) {
        this.uid = uid;
    }
    @Basic
    @Column(name = "money")
    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }
    @Basic
    @Column(name = "card_name")
    public String getCardName() {
        return cardName;
    }

    public void setCardName(String cardName) {
        this.cardName = cardName;
    }
    @Basic
    @Column(name = "card_num")
    public String getCardNum() {
        return cardNum;
    }

    public void setCardNum(String cardNum) {
        this.cardNum = cardNum;
    }
    @Basic
    @Column(name = "bank_name")
    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }
    @Basic
    @Column(name = "status")
    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }
    @Basic
    @Column(name = "create_time")
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public UserWithdrawRecord() {
    }


    public UserWithdrawRecord(String openId, String nickName, String headImgUrl, long uid,
                              double money, String cardName, String cardNum, String bankName, int status, Timestamp createTime) {
        this.openId = openId;
        this.nickName = nickName;
        this.headImgUrl = headImgUrl;
        this.uid = uid;
        this.money = money;
        this.cardName = cardName;
        this.cardNum = cardNum;
        this.bankName = bankName;
        this.status = status;
        this.createTime = createTime;
    }

    public UserWithdrawRecord(String openId, long uid, double money, String cardName, String cardNum,
                              String bankName, int status, Timestamp createTime) {
        this.openId = openId;
        this.uid = uid;
        this.money = money;
        this.cardName = cardName;
        this.cardNum = cardNum;
        this.bankName = bankName;
        this.status = status;
        this.createTime = createTime;
    }
}
